package com.elink.enginerring.user.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Update;

import com.elink.enginerring.user.entity.User;

public interface UserMapper {
    int deleteByPrimaryKey(String userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(String userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

	User selectByNameAndPwd(@Param("phone")String phone, @Param("pwd")String pwd);

	@Update("update user set passwd=#{newpw} where user_id=#{userId}")
	@ResultType(Integer.class)
	int updatePw(@Param("userId")String userId,@Param("newpw")String newpw);
}